﻿using System;
using System.Collections.Generic;
using JQueryControlExtender.Contrib.WeekCalendar;

namespace WebApplication.Sample.Contrib.WeekCalendar
{
    public partial class WeekCalendarExample : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            WeekCalendarControl1.FirstDayOfWeek = DateTime.Today.DayOfWeek;

            List<WeekCalendarEventItem> items = new List<WeekCalendarEventItem>();
            items.Add(new WeekCalendarEventItem
            {
                id = 1,
                start = DateTime.Now,
                end = DateTime.Now.AddHours(2),
                title = "Sample Event"
            });
            items.Add(new WeekCalendarEventItem
            {
                id = 2,
                start = DateTime.Now.AddDays(1),
                end = DateTime.Now.AddDays(1).AddHours(1),
                title = "Sample Event 2"
            });
            WeekCalendarControl1.CalendarEvents = items;
        }
    }
}
